home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / ListErrors.quill < prev    next >
Text File  |  1996-09-26  |  2KB  |  71 lines

  1.  
  2. /**
  3.  **  $VER: ListErrors.quill 1.0 (22.7.94)
  4.  **  By Timothy J. Aston
  5.  **
  6.  **/
  7.  
  8.  
  9. /* Some setup first.
  10.  */
  11. options results
  12. options failat 200
  13.  
  14. NL = d2c(10)
  15.  
  16. main:
  17.     /* We need the rexxsupport.library for this macro.
  18.      */
  19.     if ~show(l, "rexxsupport.library") then do
  20.         if ~addlib("rexxsupport.library", 0, -30) then do
  21.             'REQUESTNOTIFY' 'Could not build project:'NL' · libs:rexxsupport.library not installed'
  22.             exit 10
  23.         end
  24.     end
  25.  
  26.     /* Open the errors file.
  27.      */
  28.     if open('errors_fh', 't:Quill_Errors', 'R') then do
  29.         /* Read all the errors into a stem.
  30.          */
  31.         error_count = 0
  32.         do while ~eof('errors_fh')
  33.             errorfile.error_count = strip(readln('errors_fh'), 'B')
  34.             errorline.error_count = strip(readln('errors_fh'), 'B')
  35.             errorcol.error_count = strip(readln('errors_fh'), 'B')
  36.             errordesc.error_count = strip(readln('errors_fh'), 'B')
  37.             call readln('errors_fh')
  38.             call readln('errors_fh')
  39.  
  40.             if errorfile.error_count ~= "" then do
  41.                 errors.error_count = errorfile.error_count '-' 'Line' errorline.error_count':' errordesc.error_count
  42.                 error_count = error_count + 1
  43.             end
  44.         end
  45.         errors.count = error_count
  46.  
  47.         call close('errors_fh')
  48.  
  49.         /* Popup the list of errors for the user to select.
  50.          */
  51.         'REQUESTITEM' '"List of Errors and/or Warnings" STEM ERRORS'
  52.  
  53.         /* If an error was selected, bring the file the error is in to the
  54.          * front, jump to the line and column of the error and set the status
  55.          * bar to the error's description.
  56.          */
  57.         if rc = 0 then do
  58.             errornum = result
  59.             'REVEAL' errorfile.errornum
  60.             call delay(50);
  61.             'GOTOLINE' errorline.errornum
  62.             'SETSTATUSBAR' errordesc.errornum
  63.         end
  64.     end
  65.     /* Or if its not there, we have no errors.
  66.      */
  67.     else
  68.         'REQUESTNOTIFY' '"No errors"'
  69.  
  70.     exit
  71.